< previous page page_412 next page >

Page 412
Incorporating the subsystem into the Samsona Bank Teller System example
The subsystem code listings for the Samsona Bank Teller System example
An Overview of the Database Access Subsystem
Every application you develop with Visual Basic will likely have a need to persistently store information. However, there is a need to have common code with which to store that information properly. By common, it's meant that the code should be reusable and independent of any underlying data access mechanism. Simply inserting data controls on a form isn't adequate because you generally have more than one form with data controls on it or, to complicate matters, several data controls on each form. What's needed is a common, reusable, centralized subsystem dedicated to all your application's storage needs without adding too much complexity. The Database Access Subsystem presented today offers you the power and flexibility to store your application's information with less duplication of code.
The Database Access Subsystem centers on implementing an adaptable framework for data access in an object-oriented way. Of the many ways you can access a database in Visual Basic, the three more popularly used are
ActiveX Data Objects (ADO)
Remote Data Objects (RDO)
Data Access Objects (DAO)
Of the three approaches, the ActiveX Data Object framework has become the prominent one that Microsoft promotes as the standard for Visual Basic and its other development languages. Nonetheless, Remote Data Objects, which offer a friendly facade to the ODBC API, still remains popular. To a lesser extent, Data Access Objects also have a large following among Visual Basic and Visual C++ developers. In every case, the idea you should firmly understand is that it is important to have an interface generic enough to be used easily in either approach. Later, I will also discuss advanced issues in each approach, with more emphasis on ADO and RDO. Concentrating first on the common interface for all three will help reinforce the importance of coding easily and seamlessly for all three.

 
< previous page page_412 next page >

If you like this book, buy it!